package local.blueheart.data.springdatademo.service;

import local.blueheart.data.springdatademo.domain.task.TaskEntity;
import local.blueheart.data.springdatademo.exception.DataTransferException;
import org.springframework.data.domain.Page;

import java.util.List;

public interface TaskService {

    TaskEntity get(Long id);

    Page<TaskEntity> list(Integer page, Integer size);

    List<TaskEntity> list();

    int count();

    int save(TaskEntity taskScheduleJob);

    int update(TaskEntity taskScheduleJob);

    int remove(Long id);

    int batchRemove(Long[] ids);

    void initSchedule() throws DataTransferException;

    void changeStatus(Long jobId, String cmd) throws DataTransferException;

    void updateCron(Long jobId) throws DataTransferException;

    void runOneById(Long id) throws DataTransferException;

}
